package cn.edu.seu.ssny.service;


import cn.edu.seu.ssny.entity.*;
import cn.edu.seu.ssny.service.support.IBaseService;

import java.util.List;
import java.util.Optional;

public interface IAlarmService extends IBaseService<Alarm,Integer> {
    List<Alarm> findByProject(Project project);

    void address(Alarm alarm);

    void updateCreateTime(Alarm alarm);

    void create(Alarm alarm);

    Optional<Alarm> findFirstByDeviceOrderByCreateTimeDesc(Device device);

    Integer countAlarmsByProjectAndStatus(Project project, Boolean status);

}

